// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_a;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.nnee.p_img.cls_c;
import com.nnee.p_img.cls_d;
import com.nnee.p_pr.p_a.cls_u;
import java.util.LinkedList;

// Referenced classes of package com.nnee.p_pr.p_activity.a:
//            n, ac

public class cls_g extends BaseAdapter
{

    public cls_g(Context context)
    {
        d = null;
        d = context;
        e = (LayoutInflater)context.getSystemService("layout_inflater");
        a = com.nnee.p_img.cls_c.a(d, 104F);
        b = u.n(d) / 2;
    }

    private void a(n n1, com.nnee.p_pr.p_atom.cls_u u1, int i)
    {
        if(n1 != null && u1 != null) goto _L2; else goto _L1
_L1:
        return;
_L2:
        String s;
        if(u1.V().equals("-1"))
        {
            n1.c.setVisibility(8);
            n1.b.setScaleType(android.widget.ImageView.ScaleType.CENTER);
            n1.b.setImageResource(0x7f020004);
        } else
        {
            n1.c.setVisibility(0);
            n1.b.setScaleType(android.widget.ImageView.ScaleType.CENTER_CROP);
        }
        n1.c.setText(u1.U());
        n1.b.setImageDrawable(null);
        s = u1.b(com.nnee.p_pr.p_atom.g.g);
        if(s != null)
        {
            if(n1.a > 0)
            {
                com.nnee.p_img.cls_d.a().a(n1.a, 1);
                n1.a = 0;
            }
            n1.a = com.nnee.p_b.p_a.cls_d.f();
            int j;
            StringBuilder stringbuilder;
            if(n1.b.getMeasuredWidth() > 0)
                j = n1.b.getMeasuredWidth();
            else
                j = b;
            b = j;
            stringbuilder = new StringBuilder();
            n1.b.setTag(stringbuilder);
            com.nnee.p_img.cls_d.a().a(stringbuilder, 2, s, new cls_ac(this, n1), b, a, 2, n1.a);
        }
        if(true) goto _L1; else goto _L3
_L3:
    }

    public com.nnee.p_pr.p_atom.cls_u a(int i)
    {
        com.nnee.p_pr.p_atom.cls_u u1;
        if(c != null)
        {
            if(i >= c.size())
                i = -1 + c.size();
            u1 = (com.nnee.p_pr.p_atom.u)c.get(i);
        } else
        {
            u1 = null;
        }
        return u1;
    }

    public void a(LinkedList linkedlist)
    {
        c = linkedlist;
    }

    public int getCount()
    {
        int i = 0;
        if(c != null)
            i = c.size();
        return i;
    }

    public Object getItem(int i)
    {
        return a(i);
    }

    public long getItemId(int i)
    {
        return (long)i;
    }

    public View getView(int i, View view, ViewGroup viewgroup)
    {
        n n1;
        com.nnee.p_pr.p_atom.cls_u u1;
        if(view == null)
        {
            view = e.inflate(0x7f030045, null);
            n n2 = new cls_n(this);
            n2.a = 0;
            n2.b = (ImageView)view.findViewById(0x7f0d00a4);
            n2.c = (TextView)view.findViewById(0x7f0d00a6);
            view.setTag(n2);
            n1 = n2;
        } else
        {
            n1 = (n)view.getTag();
        }
        u1 = a(i);
        if(u1 != null)
            a(n1, u1, i);
        return view;
    }

    private int a;
    private int b;
    private LinkedList c;
    private Context d;
    private LayoutInflater e;
}
